/*jslint node:true*/
/*global angular*/
'use strict';
var app = angular.module('myApp', []);
app.controller('myCtrl', function ($scope, $location, $http, $timeout, $interval, toBinary) {
    $scope.myUrl = $location.absUrl();
    $scope.msg = "asdqwfqvewvevwewqdw";
    $timeout(function () {
        $scope.msg = "挨三顶五千分表武器";
    }, 5000);
    $scope.time = new Date().toLocaleTimeString();
    $interval(function () {
        $scope.time = new Date().toLocaleTimeString();
    }, 1000);
    $scope.num = 12321;
    $scope.numToBinary = toBinary.myFunc($scope.num);
    
    
    
    $http.get('service.html').then(function (response) {
        $scope.myPage = response.data;
    });
});
app.service("toBinary", function () {
    this.myFunc = function (x) {
        return x.toString(2);
    };
});




